#ifndef READTHREAD_H
#define READTHREAD_H

#include <QThread>
#include <QWidget>
#include <QEvent>
#include <QMutex>

#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <termios.h>
#include <errno.h>
#include "ycapi.h"

#define BUFFERLEN 1024
class ReadThread : public QThread
{
    Q_OBJECT
    public:
        ReadThread(int num);
	~ReadThread();
        Ycapi * ycapi;
        unsigned char ioNum;
        int flag;

    protected:
	virtual void run();

    signals:
        void ReceivedData(unsigned char*,unsigned char);
};
#endif
